	private List<Node<${module.name}>> formatTreeNode(List<${module.name}> dataList){
		LinkedHashMap<String,Node<${module.name}>> nodeMap = new LinkedHashMap<>();
		for (${module.name} data : dataList) {
			Node<${module.name}> node = new Node<>(data);
			node.setId(data.get${module.pkField.name ? cap_first}());
			node.setTitle(data.get${nodeAttr ? cap_first}());
			nodeMap.put(data.get${module.pkField.name ? cap_first}(),node);
		}
		List<String> hasParentList = new ArrayList<>();
		for (int i = 0; i < dataList.size(); i++) {
			${module.name} data = dataList.get(i);
			
			if(data.get${module.pkField.name ? cap_first}().equals(data.getParentID())) {
				continue;
			}
			
			Node<${module.name}> parentNode = nodeMap.get(data.getParentID());
			if (parentNode != null) {
				Node<${module.name}> node = nodeMap.get(data.get${module.pkField.name ? cap_first}());
				parentNode.getChildren().add(node);
				hasParentList.add(data.get${module.pkField.name ? cap_first}());
			}
		}
		for (String nodeID : hasParentList) {
			nodeMap.remove(nodeID);
		}
		return new ArrayList<>(nodeMap.values());
	}
	
	
	public static class Node<T>{
		
		private String id;
		private List<Node<T>> children = new ArrayList<>();
		private Node<T> parent;
		private String title;
		
		private final T data;
		
		public Node(T data) {
			this.data = data;
		}
		
		public String getId() {
			return id;
		}
		public void setId(String id) {
			this.id = id;
		}
		public List<Node<T>> getChildren() {
			return children;
		}
		public void setChildren(List<Node<T>> children) {
			this.children = children;
		}
		public Node<T> getParent() {
			return parent;
		}
		public void setParent(Node<T> parent) {
			this.parent = parent;
		}
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
		public boolean hasChildren() {
			return !children.isEmpty();
		}

		public T getData() {
			return data;
		}
		
	}